package com.aura.bookshop.mapper;

import com.aura.bookshop.entity.Book;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BookMapper {

    @Select("select * from book")
    List<Book> queryAll();

    @Delete("delete from book where bid = #{bid}")
    int delete(int bid);

    @Insert("insert into book (bname,author,price) values (#{bname},#{author},#{price})")
    int add(Book book);
}
